package com.wao.product.service.dto;


import javax.validation.constraints.*;
import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
import java.util.Objects;

/**
 * A DTO for the Value entity.
 */
public class ValueDTO implements Serializable {

    private Long id;

    @NotNull
    @Size(max = 5000)
    private String name;

    private String alias;

    private String image;

    @NotNull
    private Boolean imagePro;

    @NotNull
    private Boolean defaultImage;

    @NotNull
    private Boolean enabled;

    private Integer displayOrder;

    @Size(max = 8)
    private String langKey;

    @NotNull
    private Long categoryId;

    private Long propertyId;

    private String propertyName;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAlias() {
        return alias;
    }

    public void setAlias(String alias) {
        this.alias = alias;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public Boolean isImagePro() {
        return imagePro;
    }

    public void setImagePro(Boolean imagePro) {
        this.imagePro = imagePro;
    }

    public Boolean isDefaultImage() {
        return defaultImage;
    }

    public void setDefaultImage(Boolean defaultImage) {
        this.defaultImage = defaultImage;
    }

    public Boolean isEnabled() {
        return enabled;
    }

    public void setEnabled(Boolean enabled) {
        this.enabled = enabled;
    }

    public Integer getDisplayOrder() {
        return displayOrder;
    }

    public void setDisplayOrder(Integer displayOrder) {
        this.displayOrder = displayOrder;
    }

    public String getLangKey() {
        return langKey;
    }

    public void setLangKey(String langKey) {
        this.langKey = langKey;
    }

    public Long getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
    }

    public Long getPropertyId() {
        return propertyId;
    }

    public void setPropertyId(Long propertyId) {
        this.propertyId = propertyId;
    }

    public String getPropertyName() {
        return propertyName;
    }

    public void setPropertyName(String propertyName) {
        this.propertyName = propertyName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        ValueDTO valueDTO = (ValueDTO) o;
        if(valueDTO.getId() == null || getId() == null) {
            return false;
        }
        return Objects.equals(getId(), valueDTO.getId());
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(getId());
    }

    @Override
    public String toString() {
        return "ValueDTO{" +
            "id=" + getId() +
            ", name='" + getName() + "'" +
            ", alias='" + getAlias() + "'" +
            ", image='" + getImage() + "'" +
            ", imagePro='" + isImagePro() + "'" +
            ", defaultImage='" + isDefaultImage() + "'" +
            ", enabled='" + isEnabled() + "'" +
            ", displayOrder='" + getDisplayOrder() + "'" +
            ", langKey='" + getLangKey() + "'" +
            ", categoryId='" + getCategoryId() + "'" +
            "}";
    }
}
